import React from "react";
import SiderBar from './SiderBar';
import NavBar from "./NavBar";

export default class App extends React.Component{
    state={
        isShow:true
    }
    render(){
        return (
            <div>
                <NavBar {...this.state} event={()=>{
                    this.setState({
                        isShow:!this.state.isShow
                    })
                }}/>
                {this.state.isShow && <SiderBar/>}
            </div>
        )
    }
}